package com.usermanage.Mapping;

import com.usermanage.beanParam.ProjectBean;
import com.usermanage.dataDao.JpaDao;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

@Repository("projectMapping")
public interface ProjectMapping extends JpaRepository<ProjectBean, Integer> {

    @Query(value = "select count(1) from project where 1 = 1 and project_code = :project_code and id <> :id",nativeQuery = true)
    int checkExist(@Param("project_code") String project_code, @Param("id") String id);

}
